﻿using Apewer;
using Apewer.Source;
using System;
using System.Collections.Generic;
using System.Text;

namespace Apewer.Network
{

    /// <summary>邮件记录。</summary>
    [Serializable]
    public class MailRecord : Record
    {

        [NonSerialized]
        private TextSet _ts = new TextSet(false);

        [NonSerialized]
        private Exception _exception = null;

        /// <summary></summary>
        [Column]
        public string Action { get { return _ts["Action"]; } set { _ts["Action"] = value; } }

        /// <summary></summary>
        [Column]
        public string Status { get { return _ts["Status"]; } set { _ts["Status"] = value; } }

        /// <summary></summary>
        [Column(ColumnType.NText)]
        public string Error { get { return _ts["Error"]; } set { _ts["Error"] = value; } }

        /// <summary></summary>
        [Column(ColumnType.NText)]
        public string Client { get { return _ts["Client"]; } set { _ts["Client"] = value; } }

        /// <summary></summary>
        [Column(ColumnType.NText)]
        public string Message { get { return _ts["Message"]; } set { _ts["Message"] = value; } }

        /// <summary></summary>
        public Exception Exception { get { return _exception; } set { _exception = value; } }

        /// <summary></summary>
        public new virtual string ToString()
        {
            return Json.From(this).ToString();
        }

    }

}
